package com.cx.postprocesser;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

/**
 * @Author:cxy
 * @Date:2022/2/9 22:04
 */
@EnableAspectJAutoProxy(proxyTargetClass = true)
@EnableWebMvc
@EnableTransactionManagement
@ComponentScan({"com.cx.postprocesser"})
public class MyAppConfig {


    public static void main(String[] args) {
        final AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyAppConfig.class);

//        applicationContext.register(MyAppConfig.class);
        System.out.println("applicationContext.register(AppConfig.class);");
        final AService bean = applicationContext.getBean(AService.class);

    }
}
